#! /bin/bash
hadoop fs -rm -r -skipTrash /demo_input.csv
hadoop fs -rm -r -skipTrash /demo_output1.csv
hadoop fs -rm -r -skipTrash /demo_output2.csv
rm -rf ~/out1
rm -rf ~/out2
mkdir ~/out1
mkdir ~/out2
echo $(pwd)
echo "开始上传input到hdfs"
hdfs dfs -put ~/demo_input.csv /
sleep 4s
python ~/spark001.py
sleep 4s
hadoop fs -copyToLocal hdfs://master:9000/out1 ~/
echo "download out1"
hadoop fs -copyToLocal hdfs://master:9000/out2 ~/
echo "download out2"